<?php
namespace Admin\Controller;

/**
 * 平台运营收入
 * @author Administrator
 *
 */
class PlatformController extends AdminBaseController
{
   public function index()
    {
        $this->display('platform/index');
        
    }
    
    public function platlist(){
        if(session('auid')==null){
            $this->display('index/login');
            exit();
        }
         
        $page=I('page',1);
        $rows=I('rows',50);
        $start=($page-1)*$rows;
        
        $datecondi['createdate'] = array(array('egt',date("Y-m-d",strtotime("-6 day")).' 00:00:00'),array('elt',date("Y-m-d",strtotime("2 day")).' 00:00:00'));
        $PlatformProfitlog = M('PlatformProfitlog');
        $list = $PlatformProfitlog->where($condi)->order("createdate desc")->limit($start,$rows)->select();
        $count = $PlatformProfitlog->where($condi)->count();
        $map=array(
            'rows'=>$list,
            'total'=>$count
        );
        $this->ajaxReturn($map,'JSON');
    }
    
}